spectrum_fft Module



Derived Types

type, public ::  stft_result

A container for STFT output.

Components

Type Visibility Attributes Name Initial
integer(kind=int32), public, allocatable, dimension(:) :: offsets

The starting indices of each window segment.

complex(kind=real64), public, allocatable, dimension(:,:) :: stft

An M-by-N matrix containing the M-element complex-valued transforms for each of the N time points studied. M is the size of the positive half of the transform, and N is the total number of transformed segments.


Functions

public pure function irfft(x, n) result(rst)

Computes the inverse Fourier transform for a real-valued data set.

Arguments

Type IntentOptional Attributes Name
complex(kind=real64), intent(in), dimension(:) :: x

The positive half of the transform.

integer(kind=int32), intent(in), optional :: n

An optional input that can be used to specify the length of the transform. If less than the length of x, x is truncated; however, if greater than the length of x, x is padded with zeros.

Return Value real(kind=real64), allocatable, dimension(:)

The real-valued result of the inverse transform.

public pure function rfft(x, n) result(rst)

Computes the Fourier transform of a real-valued data set. Only the positive half of the transform is returned.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:) :: x

The real-valued array to transform.

integer(kind=int32), intent(in), optional :: n

An optional input that can be used to specify the length of the transform. If less than the length of x, x is truncated; however, if greater than the length of x, x is padded with zeros.

Return Value complex(kind=real64), allocatable, dimension(:)

The complex-valued result of the transform.

public pure function stft(win, x) result(rst)

Computes the short time Fourier transform of a signal.

Read more…

Arguments

Type IntentOptional Attributes Name
class(window), intent(in) :: win

The window to apply.

real(kind=real64), intent(in) :: x(:)

The signal to analyze. The signal must be longer than the size of the window.

Return Value type(stft_result)

A container filled with the transform results.